home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
vbunrar
/
frmmain.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1999-09-11
|
6KB
|
197 lines
VERSION 5.00
Begin VB.Form frmMain
Caption = "vbunrar"
ClientHeight = 2370
ClientLeft = 60
ClientTop = 345
ClientWidth = 9735
Icon = "frmMain.frx":0000
LinkTopic = "Form1"
ScaleHeight = 2370
ScaleWidth = 9735
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton cmdAbort
Caption = "&Abort"
Enabled = 0 'False
Height = 375
Left = 7800
TabIndex = 8
Top = 600
Width = 1815
End
Begin VB.PictureBox picRarProc
AutoRedraw = -1 'True
Height = 255
Left = 120
ScaleHeight = 195
ScaleWidth = 9435
TabIndex = 7
Top = 1800
Width = 9495
Begin VB.Label lblRarProc
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "lblRarProc"
ForeColor = &H8000000E&
Height = 255
Left = 4080
TabIndex = 9
Top = 0
Width = 855
End
End
Begin VB.CommandButton cmdStart
Caption = "&Start"
Height = 375
Left = 7800
TabIndex = 2
Top = 120
Width = 1815
End
Begin VB.TextBox txtDestPath
Height = 285
Left = 1320
TabIndex = 1
Text = "txtDestPath"
Top = 480
Width = 6135
End
Begin VB.TextBox txtArchPath
Height = 285
Left = 1320
TabIndex = 0
Text = "txtArchPath"
Top = 120
Width = 6135
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Extracting from :"
Height = 195
Left = 120
TabIndex = 11
Top = 1200
Width = 1140
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Extracting file :"
Height = 195
Left = 240
TabIndex = 10
Top = 1440
Width = 1035
End
Begin VB.Label lblRarArch
BackStyle = 0 'Transparent
Caption = "lblRarArch"
Height = 255
Left = 1320
TabIndex = 6
Top = 1200
Width = 8295
End
Begin VB.Label lblRarFile
BackStyle = 0 'Transparent
Caption = "lblRarFile"
Height = 255
Left = 1320
TabIndex = 5
Top = 1440
Width = 8295
End
Begin VB.Line Line1
BorderColor = &H80000014&
Index = 3
X1 = -240
X2 = 10920
Y1 = 2175
Y2 = 2175
End
Begin VB.Line Line1
BorderColor = &H80000010&
Index = 2
X1 = -240
X2 = 10920
Y1 = 2160
Y2 = 2160
End
Begin VB.Line Line1
BorderColor = &H80000014&
Index = 1
X1 = -120
X2 = 11040
Y1 = 1095
Y2 = 1095
End
Begin VB.Line Line1
BorderColor = &H80000010&
Index = 0
X1 = -120
X2 = 11040
Y1 = 1080
Y2 = 1080
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Target Path:"
Height = 255
Left = 120
TabIndex = 4
Top = 480
Width = 1095
End
Begin VB.Label Label4
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Archive Path:"
Height = 255
Left = 240
TabIndex = 3
Top = 120
Width = 975
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'/ vbUnrar by EwareZ
Private Sub cmdAbort_Click()
RAR_ABORT = True
MsgBox "Extracting Aborted!", vbInformation
' clear picturebox and labels
picRarProc.Line (0, 0)-(picRarProc.Width, picRarProc.Height), picRarProc.BackColor, BF
lblRarProc = "0%"
lblRarFile = ""
lblRarArch = ""
cmdAbort.Enabled = False
cmdStart.Enabled = True
End Sub
Private Sub cmdStart_Click()
cmdStart.Enabled = False
cmdAbort.Enabled = True
'/ The extractRar function:
'/ sExtractDir = path to extract to - example: "C:\TEMP\"
'/ sArchName = path to rararchive - example: "C:\TEST.RAR"
'/ lblRarFile = label where the current filename will be displayed
'/ lblRarArch = label where the current archivename will be displayed
'/ lblRarProc = label where the total percent will be displayed
'/ picRarProc = picturebox where the total percent will be displayed (progressbar)
'/ sRarPassword = [Optional] use this if archive is password protected - example: "password"
ExtractRAR txtDestPath.Text, txtArchPath.Text, lblRarFile, lblRarArch, lblRarProc, picRarProc
cmdAbort.Enabled = False
cmdStart.Enabled = True
End Sub
Private Sub Form_Load()
txtArchPath.Text = "example\example.rar"
txtDestPath.Text = "unpacked\"
lblRarProc = "0%"
lblRarFile = ""
lblRarArch = ""
End Sub